import Vue from 'vue'
//按需导入
import { Button, Form, FormItem, Input, Message, Container, Header,
  Aside, Main, Menu, Submenu, MenuItemGroup, MenuItem, Breadcrumb,
  BreadcrumbItem, Card, Row, Col, Table, TableColumn, Switch, Tooltip, Pagination,
  Dialog, MessageBox, Tag, Tree, Select, Option, Cascader, Alert, Tabs, TabPane,
  Step, Steps, Checkbox, CheckboxGroup, Upload,Carousel,CarouselItem,Loading,
  Timeline, TimelineItem,Badge,Avatar,Link ,Footer
} from 'element-ui'

const compenents = {
  Button, Form, FormItem, Input, Container, Header,
  Aside, Main, Menu, Submenu, MenuItemGroup, MenuItem, Breadcrumb,
  BreadcrumbItem, Card, Row, Col, Table, TableColumn, Switch, Tooltip, Pagination,
  Dialog, Tag, Tree, Select, Option, Cascader, Alert, Tabs, TabPane,
  Step, Steps, Checkbox, CheckboxGroup, Upload,Carousel,CarouselItem,Loading,
  Timeline, TimelineItem,Badge,Avatar,Link ,Footer
};

Object.values(compenents).forEach(component => {
    Vue.use(component)
});

// 将弹框组件全局挂在到VUe原形实例
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm